using System;
using System.Collections.Generic;
using System.Text;

namespace GeneticAlgorithm.CP1
{
    class Crossover
    {
        /// <summary>
        /// Given parents with genotype (x1, y1), and (x2, y2), produce 
        /// individual with genotype (x1, y2)
        /// </summary>
        /// <param name="parents">two number pairs (x1, y1) and (x2, y2)</param>
        /// <returns></returns>
        public static Individual<float[], float[]> A(params Individual<float[], float[]>[] parents)
        {
            Individual<float[], float[]> retval = 
                new Individual(new float[]{parents[0].Genotype[0], parents[1].Genotype[1]}, parents);

            //retval.Id.Add(parents[0].Id[0]);
            //retval.Id.Add(parents[1].Id[0]);

            return retval;
        }
        
        
    }
}
